<?php 
//右侧的所有分类信息
        $cateModel = new \Common\Model\Cate;
		$arcModel = new \Common\Model\Arc;
		
		$cateData = $cateModel->get();
		foreach ($cateData as $k => $v) {
			$cateData[$k]['total'] = $arcModel->where("category_cid={$v['cid']}")->count();
		}
		$tagModel = new \Common\Model\Tag;
		$arcTagModel = new \Common\Model\ArcTag;
		$tagData = $tagModel->get();
		foreach ($tagData as $k=>$v) {
			$tagData[$k]['total']= $arcTagModel->where("tag_tid={$v['tid']}")->count();
		}
?>
<html>
	
	<head>
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="Public/Home/org/bootstrap-3.3.5-dist/css/bootstrap.min.css" />
		<script src="Public/Home/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="Public/Home/org/bootstrap-3.3.5-dist/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="Public/Home/css/index.css" />
		<link rel="stylesheet" type="text/css" href="Public/Home/css/backTop.css"/>
	</head>
	<body>
	    <aside class="col-md-4 hidden-sm hidden-xs">
			<div class="_widget">
				<h4>关于自己</h4>
				<div class="_info">
					<p>不念过去,不惧未来</p>
					<p>
						<i class="glyphicon glyphicon-volume-down"></i>
						目前就学于
						<a href="http://www.houdunwang.com" target="_blank">北京后盾网</a>
					</p>
				</div>
			</div>
			<div class="_widget">
				<h4>分类列表</h4>
				<div>
					<?php foreach ($cateData as $v){?>
						<a href="<?php echo U('List/index',array('cid'=>$v['cid']))?>"><?php echo $v['cname']?> <?php if($v['total']){?>
                 (<?php echo $v['total']?>) 
               <?php }?></a>
					<?php }?>
				</div>
			</div>
			<div class="_widget">
				<h4>标签云</h4>
				<div class="_tag">
					<?php foreach ($tagData as $value){?>
						<a href="<?php echo U('List/index',array('tid'=>$value['tid']))?>"><?php echo $value['tname']?><?php echo $value['total']?></a>、
					<?php }?>
				</div>
			</div>
						
		</aside>	
	</body>
</html>
